/**
 * Copyright(c) 2013 Jade Techonologies Co., Ltd.
 *
 * History:
 *   13-7-11 上午9:46 Created by sky
 */
package com.jade.modules.message.sms;

import com.jade.framework.base.util.SimpleParameters;

/**
 * 短信业务参数。
 *
 * @author sky
 * @version 1.0 13-7-11 上午9:46
 */
public class SmsServiceParams
        extends SimpleParameters
{
    // 企业代码
    private String vaspId;
    // 服务代码
    private String vasId;
    // 业务代码
    private String serviceCode;
    // 计费方
    private int feeUserType = SmsConstants.FEE_DESTINATION;
    // 计费号码
    private String feeTerminal;

    public String getVaspId()
    {
        return vaspId;
    }

    public void setVaspId(String vaspId)
    {
        this.vaspId = vaspId;
    }

    public String getVasId()
    {
        return vasId;
    }

    public void setVasId(String vasId)
    {
        this.vasId = vasId;
    }

    public String getServiceCode()
    {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode)
    {
        this.serviceCode = serviceCode;
    }

    public int getFeeUserType()
    {
        return feeUserType;
    }

    public void setFeeUserType(int feeUserType)
    {
        this.feeUserType = feeUserType;
    }

    public String getFeeTerminal()
    {
        return feeTerminal;
    }

    public void setFeeTerminal(String feeTerminal)
    {
        this.feeTerminal = feeTerminal;
    }

    public String getFeeType()
    {
        return getString("fee_type", SmsConstants.FEE_TYPE_PIECE);
    }

    public void setFeeType(String feeType)
    {
        setString("fee_type", feeType);
    }


    public String getLinkId()
    {
        return getString("link_id");
    }

    public void setLinkId(String linkId)
    {
        setString("link_id", linkId);
    }

    public int getMtReason()
    {
        return getInt("mt_reason", SmsConstants.MT_REASON_NOT_MO);
    }

    public void setMtReason(int mtReason)
    {
        setInt("mt_reason", mtReason);
    }

    public boolean isCharge()
    {
        return getBoolean("is_charge");
    }

    public void setCharge(boolean charge)
    {
        setBoolean("is_charge", charge);
    }

    public int getFeeTerminalType()
    {
        return getInt("fee_terminal_type");
    }

    public void setFeeTerminalType(int feeTerminalType)
    {
        setInt("fee_terminal_type", feeTerminalType);
    }

    public int getTerminalType()
    {
        return getInt("terminal_type");
    }

    public void setTerminalType(int terminalType)
    {
        setInt("terminal_type", terminalType);
    }

    public int getFee()
    {
        return getInt("fee");
    }

    public void setFee(int fee)
    {
        setInt("fee", fee);
    }

    @Override
    public String toString()
    {
        final StringBuilder sb = new StringBuilder();
        sb.append("SmsServiceParams");
        sb.append("{vaspId='").append(vaspId).append('\'');
        sb.append(", vasId='").append(vasId).append('\'');
        sb.append(", serviceCode='").append(serviceCode).append('\'');
        sb.append(", feeUserType=").append(feeUserType).append('\'');
        sb.append(", feeTerminal='").append(feeTerminal).append('\'');
        sb.append(", extendedParams='").append(super.toString()).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
